package cn.itcast.goods.category.servlet;

import cn.itcast.goods.category.domain.Cate;
import cn.itcast.goods.category.service.CateService;
import cn.itcast.goods.user.servlet.Base;
import cn.itcast.servlet.BaseServlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class CateServlet extends Base {

    public String findAll(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        CateService service=new CateService();
        List<Cate> parents=service.findAll();
        req.setAttribute("parents",parents);
        return "f:/jsps/left.jsp";
    }
}
